<?php
/**
 * Created by PhpStorm.
 * User: Cao
 * Date: 03/10/2014
 * Time: 10:33
 */

class order_model extends CI_Model
{
    protected $_table="mock_order";
    public function __construct(){
        parent::__construct();
    }
    public function getOrder(){
        return $this->db->get($this->_table)->result_array();
    }
    public function getOrderlimit($data)
    {
        $this->db->limit($data);
        return $this->db->get($this->_table)->result_array();
    }
    public function SortDate($date1,$date2)
    {
        $query= $this->db->query("SELECT * FROM `mock_order`WHERE  order_time BETWEEN('$date1')AND('$date2')");
        return $query->result_array();
    }
}